"普通配置
set t_Co=256
set number
set history=100
set nocompatible "不要vim模仿vi模式，建议设置，否则会有很多不兼容的问题
syntax on"打开高亮
set tabstop=4 "让一个tab等于4个空格
set hlsearch "高亮显示结果
set incsearch "在输入要搜索的文字时，vim会实时匹配
set backspace=indent,eol,start whichwrap+=<,>,[,] "允许退格键的使用
set autoindent "自动对齐
set smartindent sw=4 "智能对齐
"set paste	"粘帖模式
"set cindent "c语言的缩进
set showmatch "设置匹配模式，类似当输入一个左括号时会匹配相应的那个右括号
"set mouse=a	"设置使用鼠标

"set nowrap "不自动换行
"colorscheme murphy 
colorscheme desert256 

"字体的设置
set guifont=Bitstream_Vera_Sans_Mono:h9:cANSI
"记住空格用下划线代替哦
set gfw=幼圆:h10:cGB2312

"编码
set    fileencodings=utf-8,gk2312,gbk,gb18030
set    termencoding=utf-8
set    fileformats=unix
set    encoding=utf-8

"其它设置
if(has("win32") || has("win95") || has("win64") || has("win16")) "判定当前操作系统类型
    let g:iswindows=1
else
	let g:iswindows=0
endif

if(g:iswindows==1) "允许鼠标的使用
	"防止linux终端下无法拷贝
	if
		has('mouse')
		set
		mouse=a
	endif
au GUIEnter * simalt ~x
endif

"ctags
set tags=/home/chenjialiang/workspace/tags
set autochdir

"Tlist
let Tlist_Ctags_Cmd='/usr/bin/ctags'
let Tlist_Show_One_File=1
let Tlist_OnlyWindow=1
let Tlist_Use_Right_Window=1
let Tlist_Sort_Type='name'
let Tlist_Exit_OnlyWindow=1
let Tlist_Show_Menu=1
let Tlist_Max_Submenu_Items=10
let Tlist_Max_Tag_length=20
let Tlist_Use_Single_Click=0
let Tlist_Auto_Open=0
let Tlist_Close_On_Select=0
let Tlist_File_Fold_Auto_Close=1
let Tlist_GainFocus_On_ToggleOpen=0
let Tlist_Process_File_Always=1
let Tlist_WinHeight=10
let Tlist_WinWidth=35
let Tlist_Use_Horiz_Window=0
map <silent> tl :TlistToggle<CR><C-w>w

"WinManager
let g:NERDTree_title='NERD Tree'
function! NERDTree_Start()
    exec 'NERDTree'
endfunction

function! NERDTree_IsValid()
    return 1
endfunction
let g:winManagerWindowLayout='NERDTree,BufExplorer' " 这里可以设置为多个窗口, 如'FileExplorer|BufExplorer|TagList'
let g:persistentBehaviour=0 "只剩一个窗口时退出
let g:winManagerWidth=35
let g:defaultExplorer=1
nmap <silent> fw :FirstExplorerWindow<cr>
nmap <silent> bw :BottomExplorerWindow<cr>
nmap <silent> wm :WMToggle<cr>

"auto open wm
"au VimEnter * WMToggle	"打开vim默认打开多窗口
au BufReadPost * TlistUpdate "打开文件后更新taglist

nmap <A-q> :q<cr>	"关闭
nmap <C-h> :wincmd w<cr>	"切换窗口
nmap <silent> > <C-w>> 	"减少窗口宽度
nmap <silent> < <C-w><lt>	"增加窗口宽度
nmap <silent> + <C-w>+
nmap <silent> _ <C-w>-
nmap <silent> bl \be	"选择缓冲区


